package com.scr.apiclientsdk;


import com.scr.apiclientsdk.client.ApiClient;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;



@Configuration
@ConfigurationProperties("api.client")//可以读取application中的配置，将配置中的值赋值到成员变量中
@Data
@ComponentScan//扫描注解
public class ApiClientConfig {

    private String accessKey;

    private String secretKey;

    @Bean
    public ApiClient yuApiClient() {
        return new ApiClient(accessKey, secretKey);
    }
}
